package com.hdw.cms.dao;

import java.util.List;
import java.util.Map;

import com.hdw.basic.dao.BaseDao;
import com.hdw.basic.model.Pager;
import com.hdw.cms.model.Attachment;

/**
 * @Description:附件DAO接口
 * @author xujin(作者)
 * @Version:V1.00(版本号)
 * @Create Date:2014-1-2(创建日期)
 */
public interface AttachmentDao extends BaseDao<Attachment> {
	
public void updatePic(Integer proTypeId,String attName,String picMessage,String proPar,int id);
public void updateVideo(Integer proTypeId,String attName,String picMessage,int id);
public Pager<Attachment>  listSearchPro(String attName);
    /**
     * 获取没有被引用的附件
     * 
     * @return
     * 
     * 
     */

	public void updateIndexImg(Integer id,Integer isIndex);
	
	public Attachment findVideoImg(Integer videoId);
	
	public Pager<Attachment> findVideo(Integer videoTypeId);
	
	public List<Attachment> findVideoBytype(Integer videoTypeId);
	
	public Pager<Attachment> findProPic(Integer proTypeId);
	
    public Attachment loadVideo(int id);
        
    public void updetePro(String proName,String proMessage,String proPar,int id);
    
    public List<Attachment> listProAndVideo();
    //根据附件所属的栏目来查找，以便删除栏目的时候删除附件
    public List<Attachment> listAttByProType(int typeId);
    //替换掉本地路径
    public void updatePath(Attachment t);
    /**
     * 根据一定数量获取的新闻图片信息
     * 
     * @return
     */
    public List<Attachment> listIndexNewPicByNum();
    
    public Map<String,Integer> getMinAdnMaxProPos();
    
    public Map<String,Integer> getMinAdnMaxVdoPos();
    
    public void updateProPos(int id,int oldPos,int newPos);
    
    public void updateVdoPos(int id,int oldPos,int newPos);


}
